import tornado.ioloop
import tornado.web

class MainHandler(tornado.web.RequestHandler):
    def get(self):
        self.write("Hello, world!")

def run_server():
    application = tornado.web.Application([
        (r"/", MainHandler),
    ])
    application.listen(8000)
    tornado.ioloop.IOLoop.current().start()

run_server()
